﻿<ResourceDictionary 
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d"
             xmlns:local="clr-namespace:RubiksApp.CubeSolverModule.View"
             >
    <local:AddSubtractConverter x:Key="addSubtractConverter" />

    <Viewbox x:Key="checkmark" Stretch="Uniform">
        <Path  Width="37.9998" Height="31.6665"  Stretch="Fill" Fill="#76EE00" 
                                  Data="F1 M 23.7501,33.25L 34.8334,44.3333L 52.2499,22.1668L 56.9999,
                                        26.9168L 34.8334,53.8333L 19.0001,38L 23.7501,33.25 Z "/>
    </Viewbox>

    <Viewbox x:Key="xmark" Stretch="Uniform">
        <Path  Width="31.6666" Height="31.6667" Canvas.Left="22.1666" Canvas.Top="22.1667" Stretch="Fill" 
              Fill="#FF000000" Data="F1 M 26.9166,22.1667L 37.9999,33.25L 49.0832,22.1668L 53.8332,26.9168L 42.7499,38L 
              53.8332,49.0834L 49.0833,53.8334L 37.9999,42.75L 26.9166,53.8334L 22.1666,49.0833L 33.25,38L 22.1667,26.9167L
              26.9166,22.1667 Z "/>
    </Viewbox>

    <Viewbox x:Key="warningmark" Stretch="Uniform">
        <Path  Width="43.9488" Height="40.9682" Canvas.Left="16.0256" Canvas.Top="14.4489" Stretch="Fill" Fill="#FF000000" Data="F1 M 58.5832,55.4172L 17.4169,55.4171C 15.5619,53.5621 15.5619,50.5546 17.4168,48.6996L 35.201,15.8402C 37.056,13.9852 40.0635,13.9852 41.9185,15.8402L 58.5832,48.6997C 60.4382,50.5546 60.4382,53.5622 58.5832,55.4172 Z M 34.0417,25.7292L 36.0208,41.9584L 39.9791,41.9583L 41.9583,25.7292L 34.0417,25.7292 Z M 38,44.3333C 36.2511,44.3333 34.8333,45.7511 34.8333,47.5C 34.8333,49.2489 36.2511,50.6667 38,50.6667C 39.7489,50.6667 41.1666,49.2489 41.1666,47.5C 41.1666,45.7511 39.7489,44.3333 38,44.3333 Z "/>
    </Viewbox>
    <DataTemplate x:Key="runnerBar">
        <Expander>
            <Expander.Header>
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height=".2*"/>
                        <RowDefinition Height=".2*"/>
                        <RowDefinition Height=".6*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width=".6*"/>
                        <ColumnDefinition Width=".4*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Text="{Binding Runner.AlgorithmName}" Grid.Column="0" Grid.Row="0" TextWrapping="Wrap" Foreground="White" />
                    <TextBlock Text="{Binding Runner.AlgorithmAuthor}" Grid.Column="0" Grid.Row="1" TextWrapping="Wrap" Foreground="White"/>
                    <TextBlock Text="{Binding Runner.AlgorithmDescription}" Grid.Column="0" Grid.Row="2" TextWrapping="Wrap" Foreground="White"/>
                    <Button Content="Run" Command="{Binding RunCommand}" Grid.Column="1" Grid.RowSpan="3"/>
                </Grid>
            </Expander.Header>
            <ListView ItemsSource="{Binding AllResults}">
                <ListView.View>
                    <GridView>
                        <GridViewColumn DisplayMemberBinding="{Binding WasCubeSolved}" Header="Was Cube Solved?" />
                        <GridViewColumn DisplayMemberBinding="{Binding MovesToCompletion}" Header="Moves to Complete"/>
                        <GridViewColumn DisplayMemberBinding="{Binding TimeToCompletion.TotalMilliseconds}" Header="Time to Complete (ms)"/>
                    </GridView>
                </ListView.View>
            </ListView>
        </Expander>
    </DataTemplate>
</ResourceDictionary>
